module Language.Coal.RawAST (Function(..), Statement(..), Expression(..)) where

import Language.Coal.Type (Type)

data Function = Function { name :: String, args :: [(String,Type)], body :: [Statement], rtype :: Type} 	
	deriving (Show, Eq, Ord)


data Statement = Expression Expression |
	If Expression [Statement] |
	While Expression [Statement] |
	Declare String (Maybe Type) |
	DeclareAndAsign String Expression (Maybe Type) |
	Return Expression
	deriving (Show, Eq, Ord)

data Expression
      = Call String [Expression] |
	Asign String Expression |
	Integer Integer |
	Identificator String
      deriving (Show, Eq, Ord)
